package com.datashare.dataentryeast.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Past;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * 一级菜单示例信息录入对象 t_ex_lpyg
 * 
 * @author lhj
 * @date 2021-12-22
 */
@TableName("t_ex_lpyg")
public class ILpyg extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 一级菜单示例ID */
    @TableId(value = "lpyg_id", type = IdType.ASSIGN_ID)
    private Long lpygId;

    /** 员工姓名 */
    @Excel(name = "员工姓名")
    private String ygxm;

    /** 出生日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "出生日期", width = 20, dateFormat = "yyyy-MM-dd")
    private Date csrq;

    /** 联系电话 */
    @Excel(name = "联系电话")
    private String lxdh;

    /** 操作时间 */
    private Date sjc;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    public void setLpygId(Long lpygId) 
    {
        this.lpygId = lpygId;
    }

    public Long getLpygId() 
    {
        return lpygId;
    }

    public void setYgxm(String ygxm) 
    {
        this.ygxm = ygxm;
    }
    @NotBlank(message = "员工姓名不能为空")
    public String getYgxm() 
    {
        return ygxm;
    }
    public void setCsrq(Date csrq) 
    {
        this.csrq = csrq;
    }
    @Past(message = "出生日期必须在当前日期之前")
    public Date getCsrq() 
    {
        return csrq;
    }
    public void setLxdh(String lxdh) 
    {
        this.lxdh = lxdh;
    }
    @Pattern(regexp = "^1([358][0-9]|4[579]|6[2567]|7[0135678]|9[89])[0-9]{8}$",message = "手机号格式不正确")
    public String getLxdh() 
    {
        return lxdh;
    }
    public void setSjc(Date sjc) 
    {
        this.sjc = sjc;
    }

    public Date getSjc() 
    {
        return sjc;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("lpygId", getLpygId())
            .append("ygxm", getYgxm())
            .append("csrq", getCsrq())
            .append("lxdh", getLxdh())
            .append("sjc", getSjc())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
